require('dotenv').config()
const express = require('express');
const router = express.Router();
const httpUtil = require('../util/httpUtil.js');
router.post('/checkUserLogin',function (req,res,next) {
  //校验用户是否登录,
  let interUrl = '/portal/user/web/UserAccountAction?action=checkUserInfo';
  ((interUrl,param,cookies)=>{
    httpUtil.doPost(interUrl,param,cookies).then(function(data){
      return res.json(JSON.parse(JSON.parse(data)));
    }).catch(err=>{
      next(err);
      return {
        status:'N'
      };
    });
  })(interUrl,"",req.cookies);
})
module.exports = router;
